package com.tvunetworks.center.user.controller.api;

import com.tvunetworks.center.common.util.Result;
import com.tvunetworks.center.common.util.ResultUtil;
import com.tvunetworks.center.user.service.UserFeatureService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: tvucc-aggregator
 * @description: UserFeatureApiController
 * @author lebronchen
 * @create: 2019-06-21 14:22
 **/
@RestController
@RequestMapping("/api/userFeature")
public class UserFeatureApiController {

    @Autowired
    private UserFeatureService userFeatureService;

    /**
     *
     * @param userId userId
     * @param feature feature
     * @param enable enable
     * @return Result
     */
    @GetMapping("/updateUserRole")
    public Result<Object>  updateUserRole(@RequestParam String userId, @RequestParam String feature, @RequestParam Integer enable){
        userFeatureService.apiUpdateUserRole(userId, feature, enable);
        return ResultUtil.success();
    }
}
